package interaction.game;

import java.util.Random;

import processing.core.PImage;
import processing.core.PVector;

public class RandomForegroundItem extends ForegroundItem {

	private static Random random = new Random();
	
	public RandomForegroundItem(PImage image, PVector position,
			PVector velocity, int loopDistance, Hero hero) {
		super(image, position, velocity, loopDistance, hero);
	}
	
	public Random getRandom()
	{
		return random;
	}

	public int getLoopDistance() {
		return super.getLoopDistance() + generateLoopOffset();
	}
	
	public int generateLoopOffset()
	{
		return (100+(int) (500*Math.abs(getRandom().nextGaussian())));
	}
}
